package fule.com.expandabletextview;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import fule.com.expandabletextview.view.ExpandableTextView;

/**
 * 作者： njb
 * 时间： 2018/8/20 0020-下午 1:04
 * 描述： 自定义可伸缩扩展的TextView
 * 来源：
 */
public class MainActivity extends AppCompatActivity {
    private ExpandableTextView tvLeft;//图片在左边
    private ExpandableTextView tvCenter;//图片在中间
    private ExpandableTextView tvRight;//图片在右边


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        //初始化控件
        initView();
    }

    /**
     * 初始化控件
     */
    private void initView() {
        tvLeft = findViewById(R.id.tv_left);
        tvCenter = findViewById(R.id.tv_center);
        tvRight = findViewById(R.id.tv_right);
        //给控件赋值
        tvLeft.setText(getString(R.string.left_string));
        tvCenter.setText(getString(R.string.center_string));
        tvRight.setText(getString(R.string.right_string));
    }
}
